package fun.rockchen.utils.responseUtils;


/**
 * @author Rock Chen
 * @Description:
 * @date 2023/10/1 15:06
 */

public enum ResponseEnum {
    SUCCESS(200, "success!"),
    FAIL(400, "fail!"),
    AUTH_ERROR(401, "用户验证发生错误，请重新登录！"),
    LOGIN_ERROR(402, "登录失败，密码不正确!"),
    LOGIN_SUCCESS(200, "登录成功！"),
    NOT_LOGIN(403, "请先登录! "),
    CREATE_USER_SUCCESS(200, "用户注册成功!"),
    CREATE_USER_FAIL(400, "用户注册失败"),
    USER_EXIST(400, "注册失败，该手机号已注册！"),
    NO_USER(444, "用户不存在！"),
    NO_DATA(200, "很抱歉，暂无数据！"),
    GET_SUCCESS(200, "数据获取成功！"),
    GET_ERROR(400, "请稍后再次尝试！"),
    INSERT_SUCCESS(200, "已成功添加新的任务！"),
    INSERT_ERROR(400, "请检查您的添加的任务，稍后再次尝试！"),
    DELETE_SUCCESS(200, "任务删除成功！"),
    DELETE_ERROR(400, "请检查您的操作，稍后再次尝试！"),
    UPDATE_ERROR(400, "请检查您的操作，稍后再次尝试！"),
    UPDATE_SUCCESS(200, "任务修改成功！"),
    TOKEN_EXPIRED(401, "您的token已过期，请重新登录！"),
    WELCOME_ACCESS(200, "欢迎访问！"),
    TASK_EXIST(50004, "该时段已经有任务，请检查您的时间！"),
    START_EARLY(50005, "起始时间不能早于结束时间"),
    ;
    private final Integer code;
    private final String message;

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    ResponseEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
